import matplotlib.pyplot as plt

# Values for the new bars to be created
new_values = [0.20, 0.39, 0.4, 0.44, 0.57, 0.66, 0.91, 0.92]
new_labels = ['N-Gram', 'Jaccard', 'Cosine', 'Random Forest', 'HITL', 'Jaro-Winkler', "GPT (temp:1.0)", "GPT (temp:0.2)"]

# Creating a new bar chart with nice colors and filled bars
plt.figure(figsize=(15, 6))
bars = plt.bar(new_labels, new_values, color=['#3498db', '#2ecc71', '#e74c3c', '#9b59b6', '#f1c40f', '#e67e22', '#1abc9c', '#34495e'])

# Adding values on top of each bar
for bar in bars:
    yval = bar.get_height()
    plt.text(bar.get_x() + bar.get_width()/2, yval + 0.01, round(yval, 3), ha='center', va='bottom')

plt.title('Experiment 1: Amicus and Bonica', fontsize=15, fontweight='bold')
plt.ylabel('Average Precision')

# Adjusting the plot to display everything nicely
plt.tight_layout(pad=3.0)
plt.savefig("figure_1.pdf")

# Displaying the created bar chart
plt.show()

